package com.yanqu.xiuxian.gameserver.tripletown.enums;

public enum OrderStatus {
    NONE(0, "占位"),
    PROGRESS(1,"进行"),
    FINISH(2,"完成"),
    FAIL(3,"失败"),
    ;

    private final int state;
    private final String desc;

    OrderStatus(int state, String desc) {
        this.state = state;
        this.desc = desc;
    }

    public int getState() {
        return state;
    }

    public String getDesc() {
        return desc;
    }

    public static OrderStatus forNumber(int state) {
        for (OrderStatus orderStatus : OrderStatus.values()) {
            if (orderStatus.state == state) {
                return orderStatus;
            }
        }
        return null;
    }
}
